#include "../../Include/System/WizAtomicCount.hpp"

//////////////////////////////////////////////////////////////////////////

#if (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_WINDOWS)
#include "./Windows/WizInnerWindowsAtomicCount.hpp"
#elif (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_LINUX)
#endif /*WIZ_CFG_PLATFORM*/

namespace Wiz
{
    namespace AtomicCount
    {
        WIZ_PRIVATE ::Wiz::AtomicCount::Ptr Create()
        {
            ::Wiz::AtomicCount::Ptr ResultPtr = WIZ_NULLPTR;
#           if (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_WINDOWS)
            ResultPtr = new ::Wiz::Inner::AtomicCount::Windows::Type();
#           elif (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_LINUX)
#           endif /*WIZ_CFG_PLATFORM*/
            if (::Wiz::NotValidPtr(ResultPtr))
            {
                ::Wiz::Exception::Throw(::Wiz::AtomicCount::CreateFailed());
            }

            return ResultPtr;
        }
        WIZ_PRIVATE ::Wiz::Void::Type Destroy(::Wiz::AtomicCount::Ptr& p)
        {
#           if (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_WINDOWS)
            ::Wiz::SafeDelete2<::Wiz::Inner::AtomicCount::Windows::Type*>(p);
#           elif (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_LINUX)
#           endif /*WIZ_CFG_PLATFORM*/
        }
    } /// end of namespace AtomicCount
} /// end of namespace Wiz

//////////////////////////////////////////////////////////////////////////

